<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: pepr3d::ModelImporter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpepr3d_1_1_model_importer.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classpepr3d_1_1_model_importer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">pepr3d::ModelImporter Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Imports triangles and color palette from a model via Assimp.  
 <a href="classpepr3d_1_1_model_importer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_model_importer_8h_source.html">ModelImporter.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae34f94fa256e598818039431f49f8709"><td class="memItemLeft" align="right" valign="top"><a id="ae34f94fa256e598818039431f49f8709"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ModelImporter</b> (const std::string p, <a class="el" href="structpepr3d_1_1_geometry_progress.html">GeometryProgress</a> *progress, ::ThreadPool &amp;threadPool)</td></tr>
<tr class="separator:ae34f94fa256e598818039431f49f8709"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca674c511db529638e83ade8aad83e24"><td class="memItemLeft" align="right" valign="top"><a id="aca674c511db529638e83ade8aad83e24"></a>
std::vector&lt; <a class="el" href="classpepr3d_1_1_data_triangle.html">DataTriangle</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#aca674c511db529638e83ade8aad83e24">getTriangles</a> () const</td></tr>
<tr class="memdesc:aca674c511db529638e83ade8aad83e24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a vector of all <a class="el" href="classpepr3d_1_1_data_triangle.html" title="Custom Triangle type holding the CGAL::Triangle_3 and additional data.">DataTriangle</a> of the imported mesh. <br /></td></tr>
<tr class="separator:aca674c511db529638e83ade8aad83e24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3ba28412e9317aff4850ccd251e721e"><td class="memItemLeft" align="right" valign="top"><a id="aa3ba28412e9317aff4850ccd251e721e"></a>
<a class="el" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#aa3ba28412e9317aff4850ccd251e721e">getColorManager</a> () const</td></tr>
<tr class="memdesc:aa3ba28412e9317aff4850ccd251e721e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="classpepr3d_1_1_color_manager.html" title="Represents a color palette, i.e., all colors and a selected active color.">ColorManager</a> of the imported mesh. <br /></td></tr>
<tr class="separator:aa3ba28412e9317aff4850ccd251e721e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49b8a0fd779eedce1cf24a910fcce833"><td class="memItemLeft" align="right" valign="top"><a id="a49b8a0fd779eedce1cf24a910fcce833"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a49b8a0fd779eedce1cf24a910fcce833">isModelLoaded</a> ()</td></tr>
<tr class="memdesc:a49b8a0fd779eedce1cf24a910fcce833"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the mesh was imported successfully. <br /></td></tr>
<tr class="separator:a49b8a0fd779eedce1cf24a910fcce833"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b27edc2cd72882c9144ff870ee26a6b"><td class="memItemLeft" align="right" valign="top"><a id="a8b27edc2cd72882c9144ff870ee26a6b"></a>
std::vector&lt; glm::vec3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a8b27edc2cd72882c9144ff870ee26a6b">getVertexBuffer</a> () const</td></tr>
<tr class="memdesc:a8b27edc2cd72882c9144ff870ee26a6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a vertex buffer of the imported mesh. <br /></td></tr>
<tr class="separator:a8b27edc2cd72882c9144ff870ee26a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d21b9019f26f672414ad0bb40bb946c"><td class="memItemLeft" align="right" valign="top"><a id="a0d21b9019f26f672414ad0bb40bb946c"></a>
std::vector&lt; std::array&lt; size_t, 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a0d21b9019f26f672414ad0bb40bb946c">getIndexBuffer</a> () const</td></tr>
<tr class="memdesc:a0d21b9019f26f672414ad0bb40bb946c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an index buffer of the imported mesh. <br /></td></tr>
<tr class="separator:a0d21b9019f26f672414ad0bb40bb946c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:aa9220087658f958e335ed87632c364be"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#aa9220087658f958e335ed87632c364be">loadModelWithJoinedVertices</a> (const std::string &amp;path)</td></tr>
<tr class="memdesc:aa9220087658f958e335ed87632c364be"><td class="mdescLeft">&#160;</td><td class="mdescRight">A method which loads the model with ALL vertex information apart from position removed. This is done to correctly merge all vertices and receive a closed mesh, which can't be done if more than one vertex per position exists.  <a href="#aa9220087658f958e335ed87632c364be">More...</a><br /></td></tr>
<tr class="separator:aa9220087658f958e335ed87632c364be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3ee5189df6ae1d8530915fe8cc964e7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#aa3ee5189df6ae1d8530915fe8cc964e7">loadModel</a> (const std::string &amp;path)</td></tr>
<tr class="memdesc:aa3ee5189df6ae1d8530915fe8cc964e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">A method which loads the model we will use for rendering - with duplicated vertices for normals, colors, etc.  <a href="#aa3ee5189df6ae1d8530915fe8cc964e7">More...</a><br /></td></tr>
<tr class="separator:aa3ee5189df6ae1d8530915fe8cc964e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf84e4d461505e722c827812418ef0d1"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classpepr3d_1_1_data_triangle.html">DataTriangle</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#acf84e4d461505e722c827812418ef0d1">processFirstMesh</a> (aiMesh *mesh)</td></tr>
<tr class="memdesc:acf84e4d461505e722c827812418ef0d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtains model information only from first of the meshes.  <a href="#acf84e4d461505e722c827812418ef0d1">More...</a><br /></td></tr>
<tr class="separator:acf84e4d461505e722c827812418ef0d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a4d252ce45c2cf7a093d8b067b55ba2ca"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a4d252ce45c2cf7a093d8b067b55ba2ca">zeroAreaCheck</a> (const std::array&lt; glm::vec3, 3 &gt; &amp;triangle, const double Eps=0.000001)</td></tr>
<tr class="memdesc:a4d252ce45c2cf7a093d8b067b55ba2ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the given triangle has a zero area either due to rounding or vertices.  <a href="#a4d252ce45c2cf7a093d8b067b55ba2ca">More...</a><br /></td></tr>
<tr class="separator:a4d252ce45c2cf7a093d8b067b55ba2ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8632c7f0d773fd50da714ef177a3b9f2"><td class="memItemLeft" align="right" valign="top"><a id="a8632c7f0d773fd50da714ef177a3b9f2"></a>
static std::vector&lt; glm::vec3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a8632c7f0d773fd50da714ef177a3b9f2">calculateVertexBuffer</a> (aiMesh *mesh)</td></tr>
<tr class="memdesc:a8632c7f0d773fd50da714ef177a3b9f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pull the correct Vertex buffer (correct as in vertices are re-used for multiple triangles) from the mesh. <br /></td></tr>
<tr class="separator:a8632c7f0d773fd50da714ef177a3b9f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa537966d73404c3f4c463799030a1d2b"><td class="memItemLeft" align="right" valign="top">static std::vector&lt; std::array&lt; size_t, 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#aa537966d73404c3f4c463799030a1d2b">calculateIndexBuffer</a> (aiMesh *mesh)</td></tr>
<tr class="memdesc:aa537966d73404c3f4c463799030a1d2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pull the correct index buffer (correct as in different than 0-N) from the mesh.  <a href="#aa537966d73404c3f4c463799030a1d2b">More...</a><br /></td></tr>
<tr class="separator:aa537966d73404c3f4c463799030a1d2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4594f67b4aa8b90ac1a21e52e1871494"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a4594f67b4aa8b90ac1a21e52e1871494">processNode</a> (aiNode *node, const aiScene *scene, std::vector&lt; aiMesh * &gt; &amp;meshes)</td></tr>
<tr class="memdesc:a4594f67b4aa8b90ac1a21e52e1871494"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes scene tree recursively. Retrieving meshes from file.  <a href="#a4594f67b4aa8b90ac1a21e52e1871494">More...</a><br /></td></tr>
<tr class="separator:a4594f67b4aa8b90ac1a21e52e1871494"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f88ce7372a94ac4682d2918f879ea05"><td class="memItemLeft" align="right" valign="top"><a id="a9f88ce7372a94ac4682d2918f879ea05"></a>
static glm::vec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_model_importer.html#a9f88ce7372a94ac4682d2918f879ea05">calculateNormal</a> (const std::array&lt; glm::vec3, 3 &gt; vertices, const glm::vec3 normals[3])</td></tr>
<tr class="memdesc:a9f88ce7372a94ac4682d2918f879ea05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates triangle normal from its vertices with orientation of original vertex normals. <br /></td></tr>
<tr class="separator:a9f88ce7372a94ac4682d2918f879ea05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a246ce191de19d1ab72551c935012405c"><td class="memItemLeft" align="right" valign="top"><a id="a246ce191de19d1ab72551c935012405c"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>mPath</b></td></tr>
<tr class="separator:a246ce191de19d1ab72551c935012405c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e1963a18c5ac3d49837b37198fb1f07"><td class="memItemLeft" align="right" valign="top"><a id="a4e1963a18c5ac3d49837b37198fb1f07"></a>
std::vector&lt; <a class="el" href="classpepr3d_1_1_data_triangle.html">DataTriangle</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mTriangles</b></td></tr>
<tr class="separator:a4e1963a18c5ac3d49837b37198fb1f07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c75d881e5a8995f9d868d3648f99fed"><td class="memItemLeft" align="right" valign="top"><a id="a0c75d881e5a8995f9d868d3648f99fed"></a>
<a class="el" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&#160;</td><td class="memItemRight" valign="bottom"><b>mPalette</b></td></tr>
<tr class="separator:a0c75d881e5a8995f9d868d3648f99fed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b325d259c20fa610a3c37505e07ed9b"><td class="memItemLeft" align="right" valign="top"><a id="a4b325d259c20fa610a3c37505e07ed9b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mModelLoaded</b> = false</td></tr>
<tr class="separator:a4b325d259c20fa610a3c37505e07ed9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a783426cd94762a3c47b208bd93131056"><td class="memItemLeft" align="right" valign="top"><a id="a783426cd94762a3c47b208bd93131056"></a>
std::vector&lt; glm::vec3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mVertexBuffer</b></td></tr>
<tr class="separator:a783426cd94762a3c47b208bd93131056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f8ebea24ac6768d0aa19e35b9378511"><td class="memItemLeft" align="right" valign="top"><a id="a1f8ebea24ac6768d0aa19e35b9378511"></a>
std::vector&lt; std::array&lt; size_t, 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mIndexBuffer</b></td></tr>
<tr class="separator:a1f8ebea24ac6768d0aa19e35b9378511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15f30eb03ee6489b372b4ca2ca2dc9de"><td class="memItemLeft" align="right" valign="top"><a id="a15f30eb03ee6489b372b4ca2ca2dc9de"></a>
<a class="el" href="structpepr3d_1_1_geometry_progress.html">GeometryProgress</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mProgress</b></td></tr>
<tr class="separator:a15f30eb03ee6489b372b4ca2ca2dc9de"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Imports triangles and color palette from a model via Assimp. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aa537966d73404c3f4c463799030a1d2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa537966d73404c3f4c463799030a1d2b">&#9670;&nbsp;</a></span>calculateIndexBuffer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::vector&lt;std::array&lt;size_t, 3&gt; &gt; pepr3d::ModelImporter::calculateIndexBuffer </td>
          <td>(</td>
          <td class="paramtype">aiMesh *&#160;</td>
          <td class="paramname"><em>mesh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pull the correct index buffer (correct as in different than 0-N) from the mesh. </p>
<p>Check for degenerate triangles which we do not want in the representation </p>

</div>
</div>
<a id="aa3ee5189df6ae1d8530915fe8cc964e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3ee5189df6ae1d8530915fe8cc964e7">&#9670;&nbsp;</a></span>loadModel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool pepr3d::ModelImporter::loadModel </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A method which loads the model we will use for rendering - with duplicated vertices for normals, colors, etc. </p>
<p>Creates an instance of the Importer class</p>
<p>Scene with some postprocessing</p>
<p>Access the file's contents </p>

</div>
</div>
<a id="aa9220087658f958e335ed87632c364be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9220087658f958e335ed87632c364be">&#9670;&nbsp;</a></span>loadModelWithJoinedVertices()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool pepr3d::ModelImporter::loadModelWithJoinedVertices </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A method which loads the model with ALL vertex information apart from position removed. This is done to correctly merge all vertices and receive a closed mesh, which can't be done if more than one vertex per position exists. </p>
<p>Creates an instance of the Importer class</p>
<p>Scene with some postprocessing</p>
<p>Access the file's contents </p>

</div>
</div>
<a id="acf84e4d461505e722c827812418ef0d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf84e4d461505e722c827812418ef0d1">&#9670;&nbsp;</a></span>processFirstMesh()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classpepr3d_1_1_data_triangle.html">DataTriangle</a>&gt; pepr3d::ModelImporter::processFirstMesh </td>
          <td>(</td>
          <td class="paramtype">aiMesh *&#160;</td>
          <td class="paramname"><em>mesh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtains model information only from first of the meshes. </p>
<p>Obtaining triangle color. Default color is set if there is no color information</p>
<p>Loading triangle vertices and normals (if it has them)</p>
<p>Calculation of surface normals from vertices and vertex normals or only from vertices.</p>
<p>Check for degenerate triangles which we do not want in the representation</p>
<p>Do last minute quality checks on the triangle</p>
<p>Place the constructed triangle </p>

</div>
</div>
<a id="a4594f67b4aa8b90ac1a21e52e1871494"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4594f67b4aa8b90ac1a21e52e1871494">&#9670;&nbsp;</a></span>processNode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pepr3d::ModelImporter::processNode </td>
          <td>(</td>
          <td class="paramtype">aiNode *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const aiScene *&#160;</td>
          <td class="paramname"><em>scene</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; aiMesh * &gt; &amp;&#160;</td>
          <td class="paramname"><em>meshes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Processes scene tree recursively. Retrieving meshes from file. </p>
<p>Process all the node's meshes (if any).</p>
<p>Recursively do the same for each of its children. </p>

</div>
</div>
<a id="a4d252ce45c2cf7a093d8b067b55ba2ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d252ce45c2cf7a093d8b067b55ba2ca">&#9670;&nbsp;</a></span>zeroAreaCheck()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pepr3d::ModelImporter::zeroAreaCheck </td>
          <td>(</td>
          <td class="paramtype">const std::array&lt; glm::vec3, 3 &gt; &amp;&#160;</td>
          <td class="paramname"><em>triangle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>Eps</em> = <code>0.000001</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns true if the given triangle has a zero area either due to rounding or vertices. </p>
<p>Check for degenerate triangles which we do not want in the representation </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Home/MFF/1-Mgr/projekt/pepr3d/src/geometry/<a class="el" href="_model_importer_8h_source.html">ModelImporter.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacepepr3d.html">pepr3d</a></li><li class="navelem"><a class="el" href="classpepr3d_1_1_model_importer.html">ModelImporter</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
